/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('adb-inc', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model Detail {
  appConf?: string(name='AppConf'),
  DBClusterId?: string(name='DBClusterId'),
  estimateExecutionCpuTimeInSeconds?: long(name='EstimateExecutionCpuTimeInSeconds'),
  lastAttemptId?: string(name='LastAttemptId'),
  lastUpdatedTimeInMillis?: long(name='LastUpdatedTimeInMillis'),
  logRootPath?: string(name='LogRootPath'),
  resourceGroupName?: string(name='ResourceGroupName'),
  startedTimeInMillis?: long(name='StartedTimeInMillis'),
  submittedTimeInMillis?: long(name='SubmittedTimeInMillis'),
  terminatedTimeInMillis?: long(name='TerminatedTimeInMillis'),
  webUiAddress?: string(name='WebUiAddress'),
}

model SparkAppInfo {
  appId?: string(name='AppId'),
  appName?: string(name='AppName'),
  detail?: Detail(name='Detail'),
  message?: string(name='Message'),
  state?: string(name='State'),
}

model AllocateClusterVpcConnectionRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  engine?: string(name='Engine'),
  insType?: string(name='InsType'),
  vSwitchId?: string(name='VSwitchId'),
  vpcId?: string(name='VpcId'),
}

model AllocateClusterVpcConnectionResponseBody = {
  requestId?: string(name='RequestId'),
}

model AllocateClusterVpcConnectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AllocateClusterVpcConnectionResponseBody(name='body'),
}

/**
 * @summary 给实例开启VPC连接
 *
 * @param request AllocateClusterVpcConnectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AllocateClusterVpcConnectionResponse
 */
async function allocateClusterVpcConnectionWithOptions(request: AllocateClusterVpcConnectionRequest, runtime: Util.RuntimeOptions): AllocateClusterVpcConnectionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.engine)) {
    query['Engine'] = request.engine;
  }
  if (!Util.isUnset(request.insType)) {
    query['InsType'] = request.insType;
  }
  if (!Util.isUnset(request.vSwitchId)) {
    query['VSwitchId'] = request.vSwitchId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AllocateClusterVpcConnection',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 给实例开启VPC连接
 *
 * @param request AllocateClusterVpcConnectionRequest
 * @return AllocateClusterVpcConnectionResponse
 */
async function allocateClusterVpcConnection(request: AllocateClusterVpcConnectionRequest): AllocateClusterVpcConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return allocateClusterVpcConnectionWithOptions(request, runtime);
}

model AuthorizeInstanceEgressRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  endpointId?: string(name='EndpointId', description='This parameter is required.'),
  insType?: string(name='InsType', description='This parameter is required.'),
}

model AuthorizeInstanceEgressResponseBody = {
  requestId?: string(name='RequestId'),
}

model AuthorizeInstanceEgressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthorizeInstanceEgressResponseBody(name='body'),
}

/**
 * @param request AuthorizeInstanceEgressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthorizeInstanceEgressResponse
 */
async function authorizeInstanceEgressWithOptions(request: AuthorizeInstanceEgressRequest, runtime: Util.RuntimeOptions): AuthorizeInstanceEgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.endpointId)) {
    query['EndpointId'] = request.endpointId;
  }
  if (!Util.isUnset(request.insType)) {
    query['InsType'] = request.insType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AuthorizeInstanceEgress',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request AuthorizeInstanceEgressRequest
 * @return AuthorizeInstanceEgressResponse
 */
async function authorizeInstanceEgress(request: AuthorizeInstanceEgressRequest): AuthorizeInstanceEgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return authorizeInstanceEgressWithOptions(request, runtime);
}

model CheckOssObjectContentConsistencyRequest {
  ak?: string(name='Ak'),
  encryptedSk?: string(name='EncryptedSk'),
  prefix?: string(name='Prefix'),
  regionId?: string(name='RegionId'),
  sourceBucketName?: string(name='SourceBucketName'),
  sourceDbClusterId?: string(name='SourceDbClusterId'),
  sourceEndpoint?: string(name='SourceEndpoint'),
  sourceRegionId?: string(name='SourceRegionId'),
  targetBucketName?: string(name='TargetBucketName'),
  targetEndpoint?: string(name='TargetEndpoint'),
}

model CheckOssObjectContentConsistencyResponseBody = {
  isConsistent?: boolean(name='IsConsistent'),
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model CheckOssObjectContentConsistencyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckOssObjectContentConsistencyResponseBody(name='body'),
}

/**
 * @summary 检查OSS的两个文件或文件前缀下的文件内容是否一致
 *
 * @param request CheckOssObjectContentConsistencyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckOssObjectContentConsistencyResponse
 */
async function checkOssObjectContentConsistencyWithOptions(request: CheckOssObjectContentConsistencyRequest, runtime: Util.RuntimeOptions): CheckOssObjectContentConsistencyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ak)) {
    query['Ak'] = request.ak;
  }
  if (!Util.isUnset(request.encryptedSk)) {
    query['EncryptedSk'] = request.encryptedSk;
  }
  if (!Util.isUnset(request.prefix)) {
    query['Prefix'] = request.prefix;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.sourceBucketName)) {
    query['SourceBucketName'] = request.sourceBucketName;
  }
  if (!Util.isUnset(request.sourceDbClusterId)) {
    query['SourceDbClusterId'] = request.sourceDbClusterId;
  }
  if (!Util.isUnset(request.sourceEndpoint)) {
    query['SourceEndpoint'] = request.sourceEndpoint;
  }
  if (!Util.isUnset(request.sourceRegionId)) {
    query['SourceRegionId'] = request.sourceRegionId;
  }
  if (!Util.isUnset(request.targetBucketName)) {
    query['TargetBucketName'] = request.targetBucketName;
  }
  if (!Util.isUnset(request.targetEndpoint)) {
    query['TargetEndpoint'] = request.targetEndpoint;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckOssObjectContentConsistency',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 检查OSS的两个文件或文件前缀下的文件内容是否一致
 *
 * @param request CheckOssObjectContentConsistencyRequest
 * @return CheckOssObjectContentConsistencyResponse
 */
async function checkOssObjectContentConsistency(request: CheckOssObjectContentConsistencyRequest): CheckOssObjectContentConsistencyResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkOssObjectContentConsistencyWithOptions(request, runtime);
}

model CreateMajorCustomerRequest {
  area?: string(name='Area'),
  customerId?: long(name='CustomerId', description='This parameter is required.'),
  customerName?: string(name='CustomerName', description='This parameter is required.'),
  description?: string(name='Description'),
  industry?: string(name='Industry'),
  pd?: string(name='Pd'),
  pdsa?: string(name='Pdsa'),
  ranking?: int32(name='Ranking'),
  rd?: string(name='Rd'),
  sa?: string(name='Sa'),
}

model CreateMajorCustomerResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateMajorCustomerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateMajorCustomerResponseBody(name='body'),
}

/**
 * @summary 新增重点客户
 *
 * @param request CreateMajorCustomerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateMajorCustomerResponse
 */
async function createMajorCustomerWithOptions(request: CreateMajorCustomerRequest, runtime: Util.RuntimeOptions): CreateMajorCustomerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.area)) {
    query['Area'] = request.area;
  }
  if (!Util.isUnset(request.customerId)) {
    query['CustomerId'] = request.customerId;
  }
  if (!Util.isUnset(request.customerName)) {
    query['CustomerName'] = request.customerName;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.industry)) {
    query['Industry'] = request.industry;
  }
  if (!Util.isUnset(request.pd)) {
    query['Pd'] = request.pd;
  }
  if (!Util.isUnset(request.pdsa)) {
    query['Pdsa'] = request.pdsa;
  }
  if (!Util.isUnset(request.ranking)) {
    query['Ranking'] = request.ranking;
  }
  if (!Util.isUnset(request.rd)) {
    query['Rd'] = request.rd;
  }
  if (!Util.isUnset(request.sa)) {
    query['Sa'] = request.sa;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateMajorCustomer',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 新增重点客户
 *
 * @param request CreateMajorCustomerRequest
 * @return CreateMajorCustomerResponse
 */
async function createMajorCustomer(request: CreateMajorCustomerRequest): CreateMajorCustomerResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMajorCustomerWithOptions(request, runtime);
}

model DeleteBucketReplicationRequest {
  ak?: string(name='Ak'),
  encryptedSk?: string(name='EncryptedSk'),
  endpoint?: string(name='Endpoint'),
  regionId?: string(name='RegionId'),
  ruleId?: string(name='RuleId'),
  sourceBucketName?: string(name='SourceBucketName'),
}

model DeleteBucketReplicationResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DeleteBucketReplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBucketReplicationResponseBody(name='body'),
}

/**
 * @summary 删除OSS跨区域复制任务
 *
 * @param request DeleteBucketReplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBucketReplicationResponse
 */
async function deleteBucketReplicationWithOptions(request: DeleteBucketReplicationRequest, runtime: Util.RuntimeOptions): DeleteBucketReplicationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ak)) {
    query['Ak'] = request.ak;
  }
  if (!Util.isUnset(request.encryptedSk)) {
    query['EncryptedSk'] = request.encryptedSk;
  }
  if (!Util.isUnset(request.endpoint)) {
    query['Endpoint'] = request.endpoint;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.sourceBucketName)) {
    query['SourceBucketName'] = request.sourceBucketName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteBucketReplication',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除OSS跨区域复制任务
 *
 * @param request DeleteBucketReplicationRequest
 * @return DeleteBucketReplicationResponse
 */
async function deleteBucketReplication(request: DeleteBucketReplicationRequest): DeleteBucketReplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteBucketReplicationWithOptions(request, runtime);
}

model DeleteDBClusterRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  force?: boolean(name='Force'),
}

model DeleteDBClusterResponseBody = {
  DBClusterId?: string(name='DBClusterId'),
  requestId?: string(name='RequestId'),
  taskId?: int32(name='TaskId'),
}

model DeleteDBClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDBClusterResponseBody(name='body'),
}

/**
 * @summary 删除集群
 *
 * @param request DeleteDBClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDBClusterResponse
 */
async function deleteDBClusterWithOptions(request: DeleteDBClusterRequest, runtime: Util.RuntimeOptions): DeleteDBClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.force)) {
    query['Force'] = request.force;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDBCluster',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除集群
 *
 * @param request DeleteDBClusterRequest
 * @return DeleteDBClusterResponse
 */
async function deleteDBCluster(request: DeleteDBClusterRequest): DeleteDBClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDBClusterWithOptions(request, runtime);
}

model DeleteMajorCustomerRequest {
  customerId?: long(name='CustomerId', description='This parameter is required.'),
}

model DeleteMajorCustomerResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteMajorCustomerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteMajorCustomerResponseBody(name='body'),
}

/**
 * @summary 删除重点客户
 *
 * @param request DeleteMajorCustomerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteMajorCustomerResponse
 */
async function deleteMajorCustomerWithOptions(request: DeleteMajorCustomerRequest, runtime: Util.RuntimeOptions): DeleteMajorCustomerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.customerId)) {
    query['CustomerId'] = request.customerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteMajorCustomer',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除重点客户
 *
 * @param request DeleteMajorCustomerRequest
 * @return DeleteMajorCustomerResponse
 */
async function deleteMajorCustomer(request: DeleteMajorCustomerRequest): DeleteMajorCustomerResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteMajorCustomerWithOptions(request, runtime);
}

model DescribeAccountsRequest {
  accountName?: string(name='AccountName'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  engine?: string(name='Engine'),
  ownerId?: string(name='OwnerId'),
}

model DescribeAccountsResponseBody = {
  accountList?: {
    DBAccount?: [ 
    {
      accountDescription?: string(name='AccountDescription'),
      accountName?: string(name='AccountName'),
      accountStatus?: string(name='AccountStatus'),
      accountType?: string(name='AccountType'),
      engine?: string(name='Engine'),
      ramUsers?: string(name='RamUsers'),
    }
  ](name='DBAccount')
  }(name='AccountList'),
  requestId?: string(name='RequestId'),
}

model DescribeAccountsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccountsResponseBody(name='body'),
}

/**
 * @summary 查询帐号列表
 *
 * @param request DescribeAccountsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccountsResponse
 */
async function describeAccountsWithOptions(request: DescribeAccountsRequest, runtime: Util.RuntimeOptions): DescribeAccountsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountName)) {
    query['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.engine)) {
    query['Engine'] = request.engine;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAccounts',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询帐号列表
 *
 * @param request DescribeAccountsRequest
 * @return DescribeAccountsResponse
 */
async function describeAccounts(request: DescribeAccountsRequest): DescribeAccountsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAccountsWithOptions(request, runtime);
}

model DescribeAdbDutyRuleRequest {
  ruleIds?: string(name='RuleIds'),
}

model DescribeAdbDutyRuleResponseBody = {
  items?: [ 
    {
      currentDutyStaff?: [ 
        {
          nickName?: string(name='NickName'),
          workerNo?: string(name='WorkerNo'),
        }
      ](name='CurrentDutyStaff'),
      ruleCode?: string(name='RuleCode'),
      ruleId?: string(name='RuleId'),
    }
  ](name='Items'),
  requestId?: string(name='RequestId'),
}

model DescribeAdbDutyRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAdbDutyRuleResponseBody(name='body'),
}

/**
 * @summary 获取ADB值班人员信息
 *
 * @param request DescribeAdbDutyRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAdbDutyRuleResponse
 */
async function describeAdbDutyRuleWithOptions(request: DescribeAdbDutyRuleRequest, runtime: Util.RuntimeOptions): DescribeAdbDutyRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ruleIds)) {
    query['RuleIds'] = request.ruleIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAdbDutyRule',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取ADB值班人员信息
 *
 * @param request DescribeAdbDutyRuleRequest
 * @return DescribeAdbDutyRuleResponse
 */
async function describeAdbDutyRule(request: DescribeAdbDutyRuleRequest): DescribeAdbDutyRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAdbDutyRuleWithOptions(request, runtime);
}

model DescribeBackupPolicyRequest {
  aliuid?: long(name='Aliuid'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  regionId?: string(name='regionId'),
}

model DescribeBackupPolicyResponseBody = {
  backupPolicy?: {
    backupLocationFull?: string(name='BackupLocationFull'),
    backupLocationLog?: string(name='BackupLocationLog'),
    backupRetentionPeriod?: int32(name='BackupRetentionPeriod'),
    clusterId?: int32(name='ClusterId'),
    enableBackupLog?: boolean(name='EnableBackupLog'),
    logBackupRetentionPeriod?: int32(name='LogBackupRetentionPeriod'),
    preferredBackupPeriod?: string(name='PreferredBackupPeriod'),
    preferredBackupTime?: string(name='PreferredBackupTime'),
  }(name='BackupPolicy'),
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeBackupPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBackupPolicyResponseBody(name='body'),
}

/**
 * @summary 获取实例的备份策略
 *
 * @param request DescribeBackupPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBackupPolicyResponse
 */
async function describeBackupPolicyWithOptions(request: DescribeBackupPolicyRequest, runtime: Util.RuntimeOptions): DescribeBackupPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliuid)) {
    query['Aliuid'] = request.aliuid;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackupPolicy',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取实例的备份策略
 *
 * @param request DescribeBackupPolicyRequest
 * @return DescribeBackupPolicyResponse
 */
async function describeBackupPolicy(request: DescribeBackupPolicyRequest): DescribeBackupPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackupPolicyWithOptions(request, runtime);
}

model DescribeBackupsRequest {
  aliUid?: string(name='AliUid'),
  backupID?: string(name='BackupID'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  endTime?: string(name='EndTime', description='This parameter is required.'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  startTime?: string(name='StartTime', description='This parameter is required.'),
  regionId?: string(name='regionId'),
}

model DescribeBackupsResponseBody = {
  backupsList?: [ 
    {
      backupEndTime?: string(name='BackupEndTime'),
      backupId?: long(name='BackupId'),
      backupMethod?: string(name='BackupMethod'),
      backupSetInfo?: string(name='BackupSetInfo'),
      backupSize?: long(name='BackupSize'),
      backupStartTime?: string(name='BackupStartTime'),
      backupType?: string(name='BackupType'),
      dbClusterId?: string(name='DbClusterId'),
      policyId?: long(name='PolicyId'),
    }
  ](name='BackupsList'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model DescribeBackupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeBackupsResponseBody(name='body'),
}

/**
 * @summary 获取实例的备份详细信息
 *
 * @param request DescribeBackupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeBackupsResponse
 */
async function describeBackupsWithOptions(request: DescribeBackupsRequest, runtime: Util.RuntimeOptions): DescribeBackupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliUid)) {
    query['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.backupID)) {
    query['BackupID'] = request.backupID;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeBackups',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取实例的备份详细信息
 *
 * @param request DescribeBackupsRequest
 * @return DescribeBackupsResponse
 */
async function describeBackups(request: DescribeBackupsRequest): DescribeBackupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBackupsWithOptions(request, runtime);
}

model DescribeClusterInstanceRequest {
  dbClusterId?: string(name='DbClusterId', description='This parameter is required.'),
  insType?: string(name='InsType'),
  regionId?: string(name='regionId'),
}

model DescribeClusterInstanceResponseBody = {
  requestId?: string(name='RequestId'),
  clusterInstance?: {
    clusterId?: int32(name='ClusterId'),
    clusterIdStr?: string(name='ClusterIdStr'),
    dbClusterId?: string(name='DbClusterId'),
    instanceId?: int32(name='InstanceId'),
    instanceIdStr?: string(name='InstanceIdStr'),
    instanceName?: string(name='InstanceName'),
    k8sServiceAccount?: string(name='K8sServiceAccount'),
    namespace?: string(name='Namespace'),
    parentId?: int32(name='ParentId'),
    replicaIdList?: [ long ](name='ReplicaIdList'),
    replicaIdStrList?: [ string ](name='ReplicaIdStrList'),
    replicas?: int32(name='Replicas'),
    state?: string(name='State'),
    version?: string(name='Version'),
    instanceType?: string(name='instanceType'),
  }(name='clusterInstance'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeClusterInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterInstanceResponseBody(name='body'),
}

/**
 * @summary 获取集群的实例信息
 *
 * @param request DescribeClusterInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterInstanceResponse
 */
async function describeClusterInstanceWithOptions(request: DescribeClusterInstanceRequest, runtime: Util.RuntimeOptions): DescribeClusterInstanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dbClusterId)) {
    query['DbClusterId'] = request.dbClusterId;
  }
  if (!Util.isUnset(request.insType)) {
    query['InsType'] = request.insType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterInstance',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取集群的实例信息
 *
 * @param request DescribeClusterInstanceRequest
 * @return DescribeClusterInstanceResponse
 */
async function describeClusterInstance(request: DescribeClusterInstanceRequest): DescribeClusterInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterInstanceWithOptions(request, runtime);
}

model DescribeClusterNetInfoRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  engine?: string(name='Engine'),
  insType?: string(name='InsType'),
}

model DescribeClusterNetInfoResponseBody = {
  clusterNetworkType?: string(name='ClusterNetworkType'),
  items?: {
    address?: [ 
    {
      connectionString?: string(name='ConnectionString'),
      connectionStringPrefix?: string(name='ConnectionStringPrefix'),
      IPAddress?: string(name='IPAddress'),
      netType?: string(name='NetType'),
      port?: string(name='Port'),
      ports?: {
        ports?: [ 
        {
          port?: string(name='Port'),
          protocol?: string(name='Protocol'),
        }
      ](name='ports')
      }(name='Ports'),
      VPCId?: string(name='VPCId'),
      vSwitchId?: string(name='VSwitchId'),
    }
  ](name='Address')
  }(name='Items'),
  requestId?: string(name='RequestId'),
}

model DescribeClusterNetInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeClusterNetInfoResponseBody(name='body'),
}

/**
 * @summary 描述集群网络信息
 *
 * @param request DescribeClusterNetInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeClusterNetInfoResponse
 */
async function describeClusterNetInfoWithOptions(request: DescribeClusterNetInfoRequest, runtime: Util.RuntimeOptions): DescribeClusterNetInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.engine)) {
    query['Engine'] = request.engine;
  }
  if (!Util.isUnset(request.insType)) {
    query['InsType'] = request.insType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeClusterNetInfo',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 描述集群网络信息
 *
 * @param request DescribeClusterNetInfoRequest
 * @return DescribeClusterNetInfoResponse
 */
async function describeClusterNetInfo(request: DescribeClusterNetInfoRequest): DescribeClusterNetInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeClusterNetInfoWithOptions(request, runtime);
}

model DescribeCustomersRequest {
  userIds?: string(name='UserIds', description='This parameter is required.'),
}

model DescribeCustomersResponseBody = {
  customers?: [ 
    {
      customerId?: string(name='CustomerId', nullable=false),
      customerName?: string(name='CustomerName', nullable=false),
      gcLevel?: string(name='GcLevel', nullable=false),
      isMajor?: int32(name='IsMajor', nullable=false),
      userId?: string(name='UserId', nullable=false),
      userName?: string(name='UserName', nullable=false),
    }
  ](name='Customers'),
  requestId?: string(name='RequestId'),
}

model DescribeCustomersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeCustomersResponseBody(name='body'),
}

/**
 * @summary 查看客户信息
 *
 * @param request DescribeCustomersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeCustomersResponse
 */
async function describeCustomersWithOptions(request: DescribeCustomersRequest, runtime: Util.RuntimeOptions): DescribeCustomersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.userIds)) {
    query['UserIds'] = request.userIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCustomers',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查看客户信息
 *
 * @param request DescribeCustomersRequest
 * @return DescribeCustomersResponse
 */
async function describeCustomers(request: DescribeCustomersRequest): DescribeCustomersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCustomersWithOptions(request, runtime);
}

model DescribeDBClusterPerformanceRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  endTime?: string(name='EndTime'),
  key?: string(name='Key'),
  regionId?: string(name='RegionId', description='This parameter is required.'),
  resourcePools?: string(name='ResourcePools'),
  startTime?: string(name='StartTime'),
}

model DescribeDBClusterPerformanceResponseBody = {
  DBClusterId?: string(name='DBClusterId'),
  endTime?: string(name='EndTime'),
  performances?: [ 
    {
      key?: string(name='Key'),
      series?: [ 
        {
          name?: string(name='Name'),
          tags?: string(name='Tags'),
          values?: [ string ](name='Values'),
        }
      ](name='Series'),
      unit?: string(name='Unit'),
    }
  ](name='Performances'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeDBClusterPerformanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDBClusterPerformanceResponseBody(name='body'),
}

/**
 * @summary 性能指标查询接口
 *
 * @param request DescribeDBClusterPerformanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDBClusterPerformanceResponse
 */
async function describeDBClusterPerformanceWithOptions(request: DescribeDBClusterPerformanceRequest, runtime: Util.RuntimeOptions): DescribeDBClusterPerformanceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.key)) {
    query['Key'] = request.key;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourcePools)) {
    query['ResourcePools'] = request.resourcePools;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDBClusterPerformance',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 性能指标查询接口
 *
 * @param request DescribeDBClusterPerformanceRequest
 * @return DescribeDBClusterPerformanceResponse
 */
async function describeDBClusterPerformance(request: DescribeDBClusterPerformanceRequest): DescribeDBClusterPerformanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDBClusterPerformanceWithOptions(request, runtime);
}

model DescribeDBResourceGroupRequest {
  customerUid?: long(name='CustomerUid', description='This parameter is required.'),
  DBClusterId?: string(name='DBClusterId'),
  excludeAINode?: boolean(name='ExcludeAINode'),
  groupName?: string(name='GroupName'),
  groupType?: string(name='GroupType'),
  regionCode?: string(name='RegionCode', description='This parameter is required.'),
}

model DescribeDBResourceGroupResponseBody = {
  groupsInfo?: [ 
    {
      autoStopInterval?: string(name='AutoStopInterval'),
      clusterMode?: string(name='ClusterMode'),
      clusterSizeResource?: string(name='ClusterSizeResource'),
      createTimestamp?: long(name='CreateTimestamp'),
      dbClusterId?: string(name='DbClusterId'),
      elasticMinComputeResource?: string(name='ElasticMinComputeResource'),
      enableSpot?: string(name='EnableSpot'),
      engine?: string(name='Engine'),
      engineParams?: map[string]any(name='EngineParams'),
      gpuModel?: {
        internalGPUModel?: string(name='InternalGPUModel'),
        allocateUnit?: string(name='allocateUnit'),
        cpu?: {
          value?: long(name='value'),
        }(name='cpu'),
        memory?: {
          value?: long(name='value'),
        }(name='memory'),
        name?: string(name='name'),
      }(name='GpuModel'),
      groupName?: string(name='GroupName'),
      groupType?: string(name='GroupType'),
      groupUsers?: string(name='GroupUsers'),
      maxClusterCount?: int32(name='MaxClusterCount'),
      maxComputeResource?: string(name='MaxComputeResource'),
      maxGpuQuantity?: int32(name='MaxGpuQuantity'),
      message?: string(name='Message', description='This parameter is required.'),
      minClusterCount?: int32(name='MinClusterCount'),
      minComputeResource?: string(name='MinComputeResource'),
      minGpuQuantity?: int32(name='MinGpuQuantity'),
      rules?: [ 
        {
          groupName?: string(name='GroupName'),
          queryTime?: string(name='QueryTime'),
          targetGroupName?: string(name='TargetGroupName'),
        }
      ](name='Rules'),
      runningClusterCount?: int32(name='RunningClusterCount'),
      specName?: string(name='SpecName'),
      status?: string(name='Status'),
      targetResourceGroupName?: string(name='TargetResourceGroupName'),
      updateTimestamp?: string(name='UpdateTimestamp'),
      vpcId?: string(name='VpcId'),
    }
  ](name='GroupsInfo'),
  requestId?: string(name='RequestId'),
}

model DescribeDBResourceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDBResourceGroupResponseBody(name='body'),
}

/**
 * @summary 查询资源组
 *
 * @param request DescribeDBResourceGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDBResourceGroupResponse
 */
async function describeDBResourceGroupWithOptions(request: DescribeDBResourceGroupRequest, runtime: Util.RuntimeOptions): DescribeDBResourceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.customerUid)) {
    query['CustomerUid'] = request.customerUid;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.excludeAINode)) {
    query['ExcludeAINode'] = request.excludeAINode;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.groupType)) {
    query['GroupType'] = request.groupType;
  }
  if (!Util.isUnset(request.regionCode)) {
    query['RegionCode'] = request.regionCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDBResourceGroup',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询资源组
 *
 * @param request DescribeDBResourceGroupRequest
 * @return DescribeDBResourceGroupResponse
 */
async function describeDBResourceGroup(request: DescribeDBResourceGroupRequest): DescribeDBResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDBResourceGroupWithOptions(request, runtime);
}

model DescribeDbClusterRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  aliUid?: long(name='aliUid', description='This parameter is required.'),
  regionId?: string(name='regionId'),
}

model DescribeDbClusterResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    dbCluster?: {
      adminRemark?: string(name='AdminRemark'),
      billingDetails?: {
        channel?: string(name='Channel'),
        commodityCode?: string(name='CommodityCode'),
        expireTime?: string(name='ExpireTime'),
        orderId?: long(name='OrderId'),
        payType?: string(name='PayType'),
      }(name='BillingDetails'),
      category?: string(name='Category'),
      dbClusterDescription?: string(name='DbClusterDescription'),
      dbClusterId?: string(name='DbClusterId'),
      dbClusterStatus?: string(name='DbClusterStatus'),
      dbType?: string(name='DbType'),
      dbVersion?: string(name='DbVersion'),
      deprecatedProperties?: {
        dbClusterType?: string(name='DbClusterType'),
        engine?: string(name='Engine'),
        engineVersion?: string(name='EngineVersion'),
        instanceClassGroup?: string(name='InstanceClassGroup'),
        storageCategory?: string(name='StorageCategory'),
      }(name='DeprecatedProperties'),
      location?: {
        regionCode?: string(name='RegionCode'),
        regionId?: string(name='RegionId'),
        subDomain?: string(name='SubDomain'),
        zoneId?: string(name='ZoneId'),
      }(name='Location'),
      mode?: string(name='Mode'),
      network?: {
        cloudInstanceIp?: string(name='CloudInstanceIp'),
        clusterNetworkType?: string(name='ClusterNetworkType'),
        connectionString?: string(name='ConnectionString'),
        dbClusterNetType?: string(name='DbClusterNetType'),
        port?: string(name='Port'),
        tunnelId?: string(name='TunnelId'),
        vSwitchId?: string(name='VSwitchId'),
        vpcCloudInstanceId?: string(name='VpcCloudInstanceId'),
        vpcId?: string(name='VpcId'),
      }(name='Network'),
      operationalStatus?: {
        fullEngineVersion?: string(name='FullEngineVersion'),
        isNonStandard?: boolean(name='IsNonStandard'),
        lockMode?: string(name='LockMode'),
        lockReason?: string(name='LockReason'),
        sampleDatasetStatus?: string(name='SampleDatasetStatus'),
      }(name='OperationalStatus'),
      platform?: string(name='Platform'),
      productForm?: string(name='ProductForm'),
      resourceAssociations?: {
        dbLogicId?: int32(name='DbLogicId'),
        kmsId?: string(name='KmsId'),
        rdsInstanceId?: string(name='RdsInstanceId'),
        resourceGroupId?: string(name='ResourceGroupId'),
        resourceMode?: string(name='ResourceMode'),
        resourceOrderId?: string(name='ResourceOrderId'),
      }(name='ResourceAssociations'),
      resourceSpec?: {
        computeResource?: string(name='ComputeResource'),
        dbNodeClass?: string(name='DbNodeClass'),
        dbNodeCount?: int32(name='DbNodeCount'),
        dbNodeStorage?: int32(name='DbNodeStorage'),
        dbNodeStorageType?: string(name='DbNodeStorageType'),
        elasticIOResource?: int32(name='ElasticIOResource'),
        elasticIOResourceSize?: string(name='ElasticIOResourceSize'),
        executorCount?: int32(name='ExecutorCount'),
        reserveAcu?: string(name='ReserveAcu'),
        reservedNodeReplicaCount?: int32(name='ReservedNodeReplicaCount'),
        reservedNodeSizeAcu?: int32(name='ReservedNodeSizeAcu'),
        storageResource?: string(name='StorageResource'),
      }(name='ResourceSpec'),
      user?: {
        aliUid?: long(name='AliUid'),
        bid?: string(name='Bid'),
        customerLevel?: string(name='CustomerLevel'),
        customerName?: string(name='CustomerName'),
        isEnterpriseCustomer?: boolean(name='IsEnterpriseCustomer'),
        isInnerCustomer?: boolean(name='IsInnerCustomer'),
        isTestCluster?: boolean(name='IsTestCluster'),
      }(name='User'),
    }(name='dbCluster'),
  }(name='data'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeDbClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDbClusterResponseBody(name='body'),
}

/**
 * @summary 查询实例信息
 *
 * @param request DescribeDbClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDbClusterResponse
 */
async function describeDbClusterWithOptions(request: DescribeDbClusterRequest, runtime: Util.RuntimeOptions): DescribeDbClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.aliUid)) {
    query['aliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDbCluster',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询实例信息
 *
 * @param request DescribeDbClusterRequest
 * @return DescribeDbClusterResponse
 */
async function describeDbCluster(request: DescribeDbClusterRequest): DescribeDbClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDbClusterWithOptions(request, runtime);
}

model DescribeDbClusterParamRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  paramName?: string(name='ParamName', description='This parameter is required.'),
  aliUid?: long(name='aliUid'),
  regionId?: string(name='regionId'),
}

model DescribeDbClusterParamResponseBody = {
  paramJson?: string(name='ParamJson'),
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeDbClusterParamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDbClusterParamResponseBody(name='body'),
}

/**
 * @summary 获取实例的参数信息
 *
 * @param request DescribeDbClusterParamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDbClusterParamResponse
 */
async function describeDbClusterParamWithOptions(request: DescribeDbClusterParamRequest, runtime: Util.RuntimeOptions): DescribeDbClusterParamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.paramName)) {
    query['ParamName'] = request.paramName;
  }
  if (!Util.isUnset(request.aliUid)) {
    query['aliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDbClusterParam',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取实例的参数信息
 *
 * @param request DescribeDbClusterParamRequest
 * @return DescribeDbClusterParamResponse
 */
async function describeDbClusterParam(request: DescribeDbClusterParamRequest): DescribeDbClusterParamResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDbClusterParamWithOptions(request, runtime);
}

model DescribeDbClusterV5Request {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  aliUid?: long(name='aliUid', description='This parameter is required.'),
  regionId?: string(name='regionId'),
}

model DescribeDbClusterV5ResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    dbCluster?: {
      adminRemark?: string(name='AdminRemark'),
      billingDetails?: {
        channel?: string(name='Channel'),
        commodityCode?: string(name='CommodityCode'),
        expireTime?: string(name='ExpireTime'),
        orderId?: long(name='OrderId'),
        payType?: string(name='PayType'),
      }(name='BillingDetails'),
      category?: string(name='Category'),
      dbClusterDescription?: string(name='DbClusterDescription'),
      dbClusterId?: string(name='DbClusterId'),
      dbClusterStatus?: string(name='DbClusterStatus'),
      dbType?: string(name='DbType'),
      dbVersion?: string(name='DbVersion'),
      deprecatedProperties?: {
        dbClusterType?: string(name='DbClusterType'),
        engine?: string(name='Engine'),
        engineVersion?: string(name='EngineVersion'),
        instanceClassGroup?: string(name='InstanceClassGroup'),
        storageCategory?: string(name='StorageCategory'),
      }(name='DeprecatedProperties'),
      location?: {
        regionCode?: string(name='RegionCode'),
        regionId?: string(name='RegionId'),
        subDomain?: string(name='SubDomain'),
        zoneId?: string(name='ZoneId'),
      }(name='Location'),
      mode?: string(name='Mode'),
      network?: {
        cloudInstanceIp?: string(name='CloudInstanceIp'),
        clusterNetworkType?: string(name='ClusterNetworkType'),
        connectionString?: string(name='ConnectionString'),
        dbClusterNetType?: string(name='DbClusterNetType'),
        port?: string(name='Port'),
        tunnelId?: string(name='TunnelId'),
        vSwitchId?: string(name='VSwitchId'),
        vpcCloudInstanceId?: string(name='VpcCloudInstanceId'),
        vpcId?: string(name='VpcId'),
      }(name='Network'),
      operationalStatus?: {
        fullEngineVersion?: string(name='FullEngineVersion'),
        isNonStandard?: boolean(name='IsNonStandard'),
        lockMode?: string(name='LockMode'),
        lockReason?: string(name='LockReason'),
        sampleDatasetStatus?: string(name='SampleDatasetStatus'),
      }(name='OperationalStatus'),
      platform?: string(name='Platform'),
      productForm?: string(name='ProductForm'),
      resourceAssociations?: {
        dbLogicId?: int32(name='DbLogicId'),
        kmsId?: string(name='KmsId'),
        rdsInstanceId?: string(name='RdsInstanceId'),
        resourceGroupId?: string(name='ResourceGroupId'),
        resourceMode?: string(name='ResourceMode'),
        resourceOrderId?: string(name='ResourceOrderId'),
      }(name='ResourceAssociations'),
      resourceSpec?: {
        computeResource?: string(name='ComputeResource'),
        dbNodeClass?: string(name='DbNodeClass'),
        dbNodeCount?: int32(name='DbNodeCount'),
        dbNodeStorage?: int32(name='DbNodeStorage'),
        dbNodeStorageType?: string(name='DbNodeStorageType'),
        elasticIOResource?: int32(name='ElasticIOResource'),
        elasticIOResourceSize?: string(name='ElasticIOResourceSize'),
        executorCount?: int32(name='ExecutorCount'),
        reserveAcu?: string(name='ReserveAcu'),
        reservedNodeReplicaCount?: int32(name='ReservedNodeReplicaCount'),
        reservedNodeSizeAcu?: int32(name='ReservedNodeSizeAcu'),
        storageResource?: string(name='StorageResource'),
      }(name='ResourceSpec'),
      user?: {
        aliUid?: long(name='AliUid'),
        bid?: string(name='Bid'),
        customerLevel?: string(name='CustomerLevel'),
        customerName?: string(name='CustomerName'),
        isEnterpriseCustomer?: boolean(name='IsEnterpriseCustomer'),
        isInnerCustomer?: boolean(name='IsInnerCustomer'),
        isTestCluster?: boolean(name='IsTestCluster'),
      }(name='User'),
    }(name='dbCluster'),
  }(name='data'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeDbClusterV5Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDbClusterV5ResponseBody(name='body'),
}

/**
 * @summary 查询实例信息
 *
 * @param request DescribeDbClusterV5Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDbClusterV5Response
 */
async function describeDbClusterV5WithOptions(request: DescribeDbClusterV5Request, runtime: Util.RuntimeOptions): DescribeDbClusterV5Response {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.aliUid)) {
    query['aliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDbClusterV5',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询实例信息
 *
 * @param request DescribeDbClusterV5Request
 * @return DescribeDbClusterV5Response
 */
async function describeDbClusterV5(request: DescribeDbClusterV5Request): DescribeDbClusterV5Response {
  var runtime = new Util.RuntimeOptions{};
  return describeDbClusterV5WithOptions(request, runtime);
}

model DescribeInstanceReleaseRequest {
  dbClusterId?: string(name='DbClusterId', description='This parameter is required.'),
  insType?: string(name='InsType'),
  regionId?: string(name='regionId'),
}

model DescribeInstanceReleaseResponseBody = {
  releaseInfo?: {
    composeName?: string(name='ComposeName'),
    description?: string(name='Description'),
    image?: string(name='Image'),
    insType?: string(name='InsType'),
    majorVersion?: string(name='MajorVersion'),
    minorVersion?: string(name='MinorVersion'),
  }(name='ReleaseInfo'),
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeInstanceReleaseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceReleaseResponseBody(name='body'),
}

/**
 * @summary 获取实例的版本信息
 *
 * @param request DescribeInstanceReleaseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceReleaseResponse
 */
async function describeInstanceReleaseWithOptions(request: DescribeInstanceReleaseRequest, runtime: Util.RuntimeOptions): DescribeInstanceReleaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.dbClusterId)) {
    query['DbClusterId'] = request.dbClusterId;
  }
  if (!Util.isUnset(request.insType)) {
    query['InsType'] = request.insType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeInstanceRelease',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取实例的版本信息
 *
 * @param request DescribeInstanceReleaseRequest
 * @return DescribeInstanceReleaseResponse
 */
async function describeInstanceRelease(request: DescribeInstanceReleaseRequest): DescribeInstanceReleaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeInstanceReleaseWithOptions(request, runtime);
}

model DescribeMajorCustomerInstancesRequest {
  customerIds?: string(name='CustomerIds', description='This parameter is required.'),
}

model DescribeMajorCustomerInstancesResponseBody = {
  majorCustomerInstances?: [ 
    {
      customerId?: string(name='CustomerId', nullable=false),
      customerName?: string(name='CustomerName', nullable=false),
      dbVersion?: string(name='DbVersion'),
      engineVersion?: string(name='EngineVersion'),
      gcLevel?: string(name='GcLevel'),
      gmtCreated?: string(name='GmtCreated'),
      gmtModified?: string(name='GmtModified'),
      instanceId?: string(name='InstanceId'),
      ranking?: long(name='Ranking'),
      regionId?: string(name='RegionId'),
      status?: string(name='Status'),
      userId?: string(name='UserId'),
      userName?: string(name='UserName'),
    }
  ](name='MajorCustomerInstances'),
  requestId?: string(name='RequestId'),
}

model DescribeMajorCustomerInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMajorCustomerInstancesResponseBody(name='body'),
}

/**
 * @summary 查看重点客户实例列表
 *
 * @param request DescribeMajorCustomerInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMajorCustomerInstancesResponse
 */
async function describeMajorCustomerInstancesWithOptions(request: DescribeMajorCustomerInstancesRequest, runtime: Util.RuntimeOptions): DescribeMajorCustomerInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.customerIds)) {
    query['CustomerIds'] = request.customerIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMajorCustomerInstances',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查看重点客户实例列表
 *
 * @param request DescribeMajorCustomerInstancesRequest
 * @return DescribeMajorCustomerInstancesResponse
 */
async function describeMajorCustomerInstances(request: DescribeMajorCustomerInstancesRequest): DescribeMajorCustomerInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMajorCustomerInstancesWithOptions(request, runtime);
}

model DescribeMajorCustomersResponseBody = {
  majorCustomers?: [ 
    {
      area?: string(name='Area', nullable=false),
      customerId?: string(name='CustomerId', nullable=false),
      customerName?: string(name='CustomerName', nullable=false),
      description?: string(name='Description'),
      industry?: string(name='Industry', nullable=false),
      pd?: string(name='Pd'),
      pdsa?: string(name='Pdsa'),
      ranking?: long(name='Ranking'),
      rd?: string(name='Rd'),
      sa?: string(name='Sa'),
    }
  ](name='MajorCustomers'),
  requestId?: string(name='RequestId'),
}

model DescribeMajorCustomersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMajorCustomersResponseBody(name='body'),
}

/**
 * @summary 查看重点客户信息
 *
 * @param request DescribeMajorCustomersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeMajorCustomersResponse
 */
async function describeMajorCustomersWithOptions(runtime: Util.RuntimeOptions): DescribeMajorCustomersResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'DescribeMajorCustomers',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查看重点客户信息
 *
 * @return DescribeMajorCustomersResponse
 */
async function describeMajorCustomers(): DescribeMajorCustomersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMajorCustomersWithOptions(runtime);
}

model DescribeOssBucketReplicationProgressRequest {
  ak?: string(name='Ak'),
  bucketName?: string(name='BucketName'),
  encryptedSk?: string(name='EncryptedSk'),
  endpoint?: string(name='Endpoint'),
  regionId?: string(name='RegionId'),
  ruleId?: string(name='RuleId'),
}

model DescribeOssBucketReplicationProgressResponseBody = {
  progress?: {
    enableHistoricalObjectReplication?: boolean(name='enableHistoricalObjectReplication'),
    historicalObjectProgress?: float(name='historicalObjectProgress'),
    newObjectProgress?: long(name='newObjectProgress'),
    replicationRuleId?: string(name='replicationRuleId'),
    replicationStatus?: string(name='replicationStatus'),
    targetBucketLocation?: string(name='targetBucketLocation'),
    targetBucketName?: string(name='targetBucketName'),
    targetCloud?: string(name='targetCloud'),
    targetCloudLocation?: string(name='targetCloudLocation'),
  }(name='Progress'),
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeOssBucketReplicationProgressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOssBucketReplicationProgressResponseBody(name='body'),
}

/**
 * @summary 获取OSS跨区域复制任务进度
 *
 * @param request DescribeOssBucketReplicationProgressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOssBucketReplicationProgressResponse
 */
async function describeOssBucketReplicationProgressWithOptions(request: DescribeOssBucketReplicationProgressRequest, runtime: Util.RuntimeOptions): DescribeOssBucketReplicationProgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ak)) {
    query['Ak'] = request.ak;
  }
  if (!Util.isUnset(request.bucketName)) {
    query['BucketName'] = request.bucketName;
  }
  if (!Util.isUnset(request.encryptedSk)) {
    query['EncryptedSk'] = request.encryptedSk;
  }
  if (!Util.isUnset(request.endpoint)) {
    query['Endpoint'] = request.endpoint;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOssBucketReplicationProgress',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取OSS跨区域复制任务进度
 *
 * @param request DescribeOssBucketReplicationProgressRequest
 * @return DescribeOssBucketReplicationProgressResponse
 */
async function describeOssBucketReplicationProgress(request: DescribeOssBucketReplicationProgressRequest): DescribeOssBucketReplicationProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOssBucketReplicationProgressWithOptions(request, runtime);
}

model DescribeOssBucketReplicationRulesRequest {
  ak?: string(name='Ak'),
  bucketName?: string(name='BucketName'),
  encryptedSk?: string(name='EncryptedSk'),
  endpoint?: string(name='Endpoint'),
  regionId?: string(name='RegionId'),
}

model DescribeOssBucketReplicationRulesResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    rules?: [ 
      {
        enableHistoricalObjectReplication?: boolean(name='enableHistoricalObjectReplication'),
        objectPrefixList?: [ string ](name='objectPrefixList'),
        replicaKmsKeyID?: string(name='replicaKmsKeyID'),
        replicationActionList?: [ string ](name='replicationActionList'),
        replicationRuleID?: string(name='replicationRuleID'),
        replicationStatus?: string(name='replicationStatus'),
        sseKmsEncryptedObjectsStatus?: string(name='sseKmsEncryptedObjectsStatus'),
        syncRole?: string(name='syncRole'),
        targetBucketLocation?: string(name='targetBucketLocation'),
        targetBucketName?: string(name='targetBucketName'),
        targetCloud?: string(name='targetCloud'),
        targetCloudLocation?: string(name='targetCloudLocation'),
      }
    ](name='Rules'),
  }(name='Result'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeOssBucketReplicationRulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOssBucketReplicationRulesResponseBody(name='body'),
}

/**
 * @summary 获取OSS跨区域复制任务进度
 *
 * @param request DescribeOssBucketReplicationRulesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOssBucketReplicationRulesResponse
 */
async function describeOssBucketReplicationRulesWithOptions(request: DescribeOssBucketReplicationRulesRequest, runtime: Util.RuntimeOptions): DescribeOssBucketReplicationRulesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ak)) {
    query['Ak'] = request.ak;
  }
  if (!Util.isUnset(request.bucketName)) {
    query['BucketName'] = request.bucketName;
  }
  if (!Util.isUnset(request.encryptedSk)) {
    query['EncryptedSk'] = request.encryptedSk;
  }
  if (!Util.isUnset(request.endpoint)) {
    query['Endpoint'] = request.endpoint;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOssBucketReplicationRules',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取OSS跨区域复制任务进度
 *
 * @param request DescribeOssBucketReplicationRulesRequest
 * @return DescribeOssBucketReplicationRulesResponse
 */
async function describeOssBucketReplicationRules(request: DescribeOssBucketReplicationRulesRequest): DescribeOssBucketReplicationRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOssBucketReplicationRulesWithOptions(request, runtime);
}

model DescribeOssInfoRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  encrypted?: boolean(name='Encrypted'),
  regionId?: string(name='regionId'),
}

model DescribeOssInfoResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  ossInfo?: {
    accessId?: string(name='accessId'),
    accessSecret?: string(name='accessSecret'),
    bucket?: string(name='bucket'),
    dbClusterId?: string(name='dbClusterId'),
    endpoint?: string(name='endpoint'),
    keepDays?: string(name='keepDays'),
    ownerId?: string(name='ownerId'),
    policyName?: string(name='policyName'),
    region?: string(name='region'),
    roleName?: string(name='roleName'),
    url?: string(name='url'),
    userName?: string(name='userName'),
  }(name='ossInfo'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeOssInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOssInfoResponseBody(name='body'),
}

/**
 * @summary 获取实例的OSS信息
 *
 * @param request DescribeOssInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOssInfoResponse
 */
async function describeOssInfoWithOptions(request: DescribeOssInfoRequest, runtime: Util.RuntimeOptions): DescribeOssInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.encrypted)) {
    query['Encrypted'] = request.encrypted;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOssInfo',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取实例的OSS信息
 *
 * @param request DescribeOssInfoRequest
 * @return DescribeOssInfoResponse
 */
async function describeOssInfo(request: DescribeOssInfoRequest): DescribeOssInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOssInfoWithOptions(request, runtime);
}

model DescribeOssInfoV2Request {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  aliUid?: long(name='aliUid'),
  regionId?: string(name='regionId'),
}

model DescribeOssInfoV2ResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  ossInfo?: {
    accessId?: string(name='accessId'),
    accessSecret?: string(name='accessSecret'),
    bucket?: string(name='bucket'),
    endpoint?: string(name='endpoint'),
    keepDays?: string(name='keepDays'),
    ownerId?: string(name='ownerId'),
    policyName?: string(name='policyName'),
    region?: string(name='region'),
    roleName?: string(name='roleName'),
    userName?: string(name='userName'),
  }(name='ossInfo'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model DescribeOssInfoV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOssInfoV2ResponseBody(name='body'),
}

/**
 * @summary 获取实例的OSS信息
 *
 * @param request DescribeOssInfoV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOssInfoV2Response
 */
async function describeOssInfoV2WithOptions(request: DescribeOssInfoV2Request, runtime: Util.RuntimeOptions): DescribeOssInfoV2Response {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.aliUid)) {
    query['aliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeOssInfoV2',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取实例的OSS信息
 *
 * @param request DescribeOssInfoV2Request
 * @return DescribeOssInfoV2Response
 */
async function describeOssInfoV2(request: DescribeOssInfoV2Request): DescribeOssInfoV2Response {
  var runtime = new Util.RuntimeOptions{};
  return describeOssInfoV2WithOptions(request, runtime);
}

model DescribeTaskStatusRequest {
  DBClusterId?: string(name='DBClusterId'),
  taskId?: long(name='TaskId', description='This parameter is required.'),
}

model DescribeTaskStatusResponseBody = {
  requestId?: string(name='RequestId'),
  taskInfo?: {
    status?: string(name='Status'),
    taskId?: long(name='TaskId'),
  }(name='TaskInfo'),
}

model DescribeTaskStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTaskStatusResponseBody(name='body'),
}

/**
 * @summary 查询异步任务状态
 *
 * @param request DescribeTaskStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTaskStatusResponse
 */
async function describeTaskStatusWithOptions(request: DescribeTaskStatusRequest, runtime: Util.RuntimeOptions): DescribeTaskStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeTaskStatus',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询异步任务状态
 *
 * @param request DescribeTaskStatusRequest
 * @return DescribeTaskStatusResponse
 */
async function describeTaskStatus(request: DescribeTaskStatusRequest): DescribeTaskStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTaskStatusWithOptions(request, runtime);
}

model GenerateZeroEtlTokenRequest {
  content?: string(name='Content'),
  DBClusterId?: string(name='DBClusterId'),
  polarDBInstanceId?: string(name='PolarDBInstanceId'),
  regionId?: string(name='RegionId'),
  UID?: string(name='UID'),
}

model GenerateZeroEtlTokenResponseBody = {
  requestId?: string(name='RequestId'),
  token?: string(name='Token'),
}

model GenerateZeroEtlTokenResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GenerateZeroEtlTokenResponseBody(name='body'),
}

/**
 * @summary 弹性导入生成鉴权token接口。
 *
 * @param request GenerateZeroEtlTokenRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GenerateZeroEtlTokenResponse
 */
async function generateZeroEtlTokenWithOptions(request: GenerateZeroEtlTokenRequest, runtime: Util.RuntimeOptions): GenerateZeroEtlTokenResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.content)) {
    body['Content'] = request.content;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    body['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.polarDBInstanceId)) {
    body['PolarDBInstanceId'] = request.polarDBInstanceId;
  }
  if (!Util.isUnset(request.regionId)) {
    body['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.UID)) {
    body['UID'] = request.UID;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GenerateZeroEtlToken',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 弹性导入生成鉴权token接口。
 *
 * @param request GenerateZeroEtlTokenRequest
 * @return GenerateZeroEtlTokenResponse
 */
async function generateZeroEtlToken(request: GenerateZeroEtlTokenRequest): GenerateZeroEtlTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  return generateZeroEtlTokenWithOptions(request, runtime);
}

model GetAATOssInfoForADBRequest {
  aliUid?: string(name='AliUid'),
  polarDBInstanceId?: string(name='PolarDBInstanceId'),
  regionId?: string(name='RegionId'),
}

model GetAATOssInfoForADBResponseBody = {
  ossInfo?: {
    accessKeyId?: string(name='AccessKeyId'),
    accessKeySecret?: string(name='AccessKeySecret'),
    ossBucket?: string(name='OssBucket'),
    ossEndpoint?: string(name='OssEndpoint'),
    path?: string(name='Path'),
    securityToken?: string(name='SecurityToken'),
  }(name='OssInfo'),
  requestId?: string(name='RequestId'),
}

model GetAATOssInfoForADBResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAATOssInfoForADBResponseBody(name='body'),
}

/**
 * @summary 获取aat表oss信息。
 *
 * @param request GetAATOssInfoForADBRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAATOssInfoForADBResponse
 */
async function getAATOssInfoForADBWithOptions(request: GetAATOssInfoForADBRequest, runtime: Util.RuntimeOptions): GetAATOssInfoForADBResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.aliUid)) {
    body['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.polarDBInstanceId)) {
    body['PolarDBInstanceId'] = request.polarDBInstanceId;
  }
  if (!Util.isUnset(request.regionId)) {
    body['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetAATOssInfoForADB',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取aat表oss信息。
 *
 * @param request GetAATOssInfoForADBRequest
 * @return GetAATOssInfoForADBResponse
 */
async function getAATOssInfoForADB(request: GetAATOssInfoForADBRequest): GetAATOssInfoForADBResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAATOssInfoForADBWithOptions(request, runtime);
}

model GetBucketTransferAccelerationRequest {
  ak?: string(name='Ak'),
  bucketName?: string(name='BucketName'),
  encryptedSk?: string(name='EncryptedSk'),
  endpoint?: string(name='Endpoint'),
  regionId?: string(name='RegionId'),
}

model GetBucketTransferAccelerationResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model GetBucketTransferAccelerationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBucketTransferAccelerationResponseBody(name='body'),
}

/**
 * @summary 查询OSS Bucket传输加速功能
 *
 * @param request GetBucketTransferAccelerationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBucketTransferAccelerationResponse
 */
async function getBucketTransferAccelerationWithOptions(request: GetBucketTransferAccelerationRequest, runtime: Util.RuntimeOptions): GetBucketTransferAccelerationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ak)) {
    query['Ak'] = request.ak;
  }
  if (!Util.isUnset(request.bucketName)) {
    query['BucketName'] = request.bucketName;
  }
  if (!Util.isUnset(request.encryptedSk)) {
    query['EncryptedSk'] = request.encryptedSk;
  }
  if (!Util.isUnset(request.endpoint)) {
    query['Endpoint'] = request.endpoint;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetBucketTransferAcceleration',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询OSS Bucket传输加速功能
 *
 * @param request GetBucketTransferAccelerationRequest
 * @return GetBucketTransferAccelerationResponse
 */
async function getBucketTransferAcceleration(request: GetBucketTransferAccelerationRequest): GetBucketTransferAccelerationResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBucketTransferAccelerationWithOptions(request, runtime);
}

model GetDBResourceGroupRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  groupName?: string(name='GroupName'),
  regionId?: string(name='regionId'),
}

model GetDBResourceGroupResponseBody = {
  groupsInfo?: [ 
    {
      autoStopInterval?: string(name='AutoStopInterval'),
      clusterMode?: string(name='ClusterMode'),
      clusterSizeResource?: string(name='ClusterSizeResource'),
      createTime?: string(name='CreateTime'),
      elasticMinComputeResource?: string(name='ElasticMinComputeResource'),
      enableSpot?: string(name='EnableSpot'),
      engine?: string(name='Engine'),
      engineParams?: map[string]any(name='EngineParams'),
      groupName?: string(name='GroupName'),
      groupType?: string(name='GroupType'),
      groupUserList?: [ string ](name='GroupUserList'),
      groupUsers?: string(name='GroupUsers'),
      maxClusterCount?: int32(name='MaxClusterCount'),
      maxComputeResource?: string(name='MaxComputeResource'),
      maxGpuQuantity?: int32(name='MaxGpuQuantity'),
      message?: string(name='Message', description='This parameter is required.'),
      minClusterCount?: int32(name='MinClusterCount'),
      minComputeResource?: string(name='MinComputeResource'),
      minGpuQuantity?: int32(name='MinGpuQuantity'),
      nodeNum?: int32(name='NodeNum'),
      rules?: [ 
        {
          groupName?: string(name='GroupName'),
          queryTime?: string(name='QueryTime'),
          targetGroupName?: string(name='TargetGroupName'),
        }
      ](name='Rules'),
      runningClusterCount?: int32(name='RunningClusterCount'),
      specName?: string(name='SpecName'),
      status?: string(name='Status'),
      targetResourceGroupName?: string(name='TargetResourceGroupName'),
      updateTime?: string(name='UpdateTime'),
    }
  ](name='GroupsInfo'),
  requestId?: string(name='RequestId'),
}

model GetDBResourceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDBResourceGroupResponseBody(name='body'),
}

/**
 * @summary 获取实例资源组
 *
 * @param request GetDBResourceGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDBResourceGroupResponse
 */
async function getDBResourceGroupWithOptions(request: GetDBResourceGroupRequest, runtime: Util.RuntimeOptions): GetDBResourceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.groupName)) {
    query['GroupName'] = request.groupName;
  }
  if (!Util.isUnset(request.regionId)) {
    query['regionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDBResourceGroup',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取实例资源组
 *
 * @param request GetDBResourceGroupRequest
 * @return GetDBResourceGroupResponse
 */
async function getDBResourceGroup(request: GetDBResourceGroupRequest): GetDBResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDBResourceGroupWithOptions(request, runtime);
}

model GetInitDmsAIServiceK8sEnvInfoRequest {
  aliUid?: string(name='AliUid', description='This parameter is required.'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  resourceGroupName?: string(name='ResourceGroupName'),
}

model GetInitDmsAIServiceK8sEnvInfoResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  success?: boolean(name='Success'),
  data?: {
    annotations?: map[string]string(name='Annotations'),
    apiServerProxyPvlAddress?: string(name='ApiServerProxyPvlAddress'),
    asiClusterId?: string(name='AsiClusterId'),
    dbClusterId?: string(name='DbClusterId'),
    engineParams?: map[string]string(name='EngineParams'),
    k8sNamespace?: string(name='K8sNamespace'),
    k8sServiceAccount?: string(name='K8sServiceAccount'),
    labels?: map[string]string(name='Labels'),
    maxComputeResource?: string(name='MaxComputeResource'),
    minComputeResource?: string(name='MinComputeResource'),
    poolEngine?: string(name='PoolEngine'),
    poolName?: string(name='PoolName'),
    poolType?: string(name='PoolType'),
    priorityClassName?: string(name='PriorityClassName'),
    ready?: boolean(name='Ready'),
    runtimeClassName?: string(name='RuntimeClassName'),
    serviceAccountToken?: string(name='ServiceAccountToken'),
    volumesJson?: string(name='VolumesJson'),
  }(name='data'),
}

model GetInitDmsAIServiceK8sEnvInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetInitDmsAIServiceK8sEnvInfoResponseBody(name='body'),
}

/**
 * @summary 获取打通DMS AI Service的pvl并初始化K8s环境任务的结果
 *
 * @param request GetInitDmsAIServiceK8sEnvInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetInitDmsAIServiceK8sEnvInfoResponse
 */
async function getInitDmsAIServiceK8sEnvInfoWithOptions(request: GetInitDmsAIServiceK8sEnvInfoRequest, runtime: Util.RuntimeOptions): GetInitDmsAIServiceK8sEnvInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliUid)) {
    query['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.resourceGroupName)) {
    query['ResourceGroupName'] = request.resourceGroupName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetInitDmsAIServiceK8sEnvInfo',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取打通DMS AI Service的pvl并初始化K8s环境任务的结果
 *
 * @param request GetInitDmsAIServiceK8sEnvInfoRequest
 * @return GetInitDmsAIServiceK8sEnvInfoResponse
 */
async function getInitDmsAIServiceK8sEnvInfo(request: GetInitDmsAIServiceK8sEnvInfoRequest): GetInitDmsAIServiceK8sEnvInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getInitDmsAIServiceK8sEnvInfoWithOptions(request, runtime);
}

model GetSparkAppMetricsRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='s202204221525hzca7d8140000003'),
}

model GetSparkAppMetricsResponseBody = {
  data?: {
    appId?: string(name='AppId'),
    attemptId?: string(name='AttemptId'),
    eventLogPath?: string(name='EventLogPath'),
    finished?: boolean(name='Finished'),
    scanMetrics?: {
      outputRowsCount?: long(name='OutputRowsCount'),
      totalReadFileSizeInByte?: long(name='TotalReadFileSizeInByte'),
    }(name='ScanMetrics'),
  }(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetSparkAppMetricsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSparkAppMetricsResponseBody(name='body'),
}

/**
 * @summary 获取Spark应用指标信息
 *
 * @param request GetSparkAppMetricsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSparkAppMetricsResponse
 */
async function getSparkAppMetricsWithOptions(request: GetSparkAppMetricsRequest, runtime: Util.RuntimeOptions): GetSparkAppMetricsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSparkAppMetrics',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取Spark应用指标信息
 *
 * @param request GetSparkAppMetricsRequest
 * @return GetSparkAppMetricsResponse
 */
async function getSparkAppMetrics(request: GetSparkAppMetricsRequest): GetSparkAppMetricsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSparkAppMetricsWithOptions(request, runtime);
}

model GetSparkSubmitInfoRequest {
  conf?: string(name='Conf'),
  DBClusterId?: string(name='DBClusterId'),
  resourceGroupName?: string(name='ResourceGroupName'),
  trustedCallerParentId?: long(name='TrustedCallerParentId'),
  trustedCallerType?: string(name='TrustedCallerType'),
  trustedCallerUid?: long(name='TrustedCallerUid'),
}

model GetSparkSubmitInfoResponseBody = {
  data?: map[string]any(name='Data'),
  requestId?: string(name='RequestId'),
}

model GetSparkSubmitInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSparkSubmitInfoResponseBody(name='body'),
}

/**
 * @summary 获取提交Spark需要的必要信息
 *
 * @param request GetSparkSubmitInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSparkSubmitInfoResponse
 */
async function getSparkSubmitInfoWithOptions(request: GetSparkSubmitInfoRequest, runtime: Util.RuntimeOptions): GetSparkSubmitInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.conf)) {
    body['Conf'] = request.conf;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    body['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.resourceGroupName)) {
    body['ResourceGroupName'] = request.resourceGroupName;
  }
  if (!Util.isUnset(request.trustedCallerParentId)) {
    body['TrustedCallerParentId'] = request.trustedCallerParentId;
  }
  if (!Util.isUnset(request.trustedCallerType)) {
    body['TrustedCallerType'] = request.trustedCallerType;
  }
  if (!Util.isUnset(request.trustedCallerUid)) {
    body['TrustedCallerUid'] = request.trustedCallerUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSparkSubmitInfo',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取提交Spark需要的必要信息
 *
 * @param request GetSparkSubmitInfoRequest
 * @return GetSparkSubmitInfoResponse
 */
async function getSparkSubmitInfo(request: GetSparkSubmitInfoRequest): GetSparkSubmitInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSparkSubmitInfoWithOptions(request, runtime);
}

model InitDmsAIServiceK8sEnvRequest {
  aliUid?: string(name='AliUid', description='This parameter is required.'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  vSwitchId?: string(name='VSwitchId', description='This parameter is required.'),
  vpcId?: string(name='VpcId', description='This parameter is required.'),
}

model InitDmsAIServiceK8sEnvResponseBody = {
  taskId?: long(name='TaskId'),
}

model InitDmsAIServiceK8sEnvResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InitDmsAIServiceK8sEnvResponseBody(name='body'),
}

/**
 * @summary 打通DMS AI Service的pvl并初始化K8s环境
 *
 * @param request InitDmsAIServiceK8sEnvRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InitDmsAIServiceK8sEnvResponse
 */
async function initDmsAIServiceK8sEnvWithOptions(request: InitDmsAIServiceK8sEnvRequest, runtime: Util.RuntimeOptions): InitDmsAIServiceK8sEnvResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.aliUid)) {
    query['AliUid'] = request.aliUid;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.vSwitchId)) {
    query['VSwitchId'] = request.vSwitchId;
  }
  if (!Util.isUnset(request.vpcId)) {
    query['VpcId'] = request.vpcId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InitDmsAIServiceK8sEnv',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 打通DMS AI Service的pvl并初始化K8s环境
 *
 * @param request InitDmsAIServiceK8sEnvRequest
 * @return InitDmsAIServiceK8sEnvResponse
 */
async function initDmsAIServiceK8sEnv(request: InitDmsAIServiceK8sEnvRequest): InitDmsAIServiceK8sEnvResponse {
  var runtime = new Util.RuntimeOptions{};
  return initDmsAIServiceK8sEnvWithOptions(request, runtime);
}

model InnerGetSparkAppInfoRequest {
  appId?: string(name='AppId', description='This parameter is required.'),
  trustedCallerParentId?: long(name='TrustedCallerParentId', description='This parameter is required.'),
  trustedCallerType?: string(name='TrustedCallerType', description='This parameter is required.'),
  trustedCallerUid?: long(name='TrustedCallerUid', description='This parameter is required.'),
}

model InnerGetSparkAppInfoResponseBody = {
  data?: SparkAppInfo(name='Data'),
  requestId?: string(name='RequestId'),
}

model InnerGetSparkAppInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InnerGetSparkAppInfoResponseBody(name='body'),
}

/**
 * @summary 获取Spark应用的详细信息
 *
 * @param request InnerGetSparkAppInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InnerGetSparkAppInfoResponse
 */
async function innerGetSparkAppInfoWithOptions(request: InnerGetSparkAppInfoRequest, runtime: Util.RuntimeOptions): InnerGetSparkAppInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.trustedCallerParentId)) {
    body['TrustedCallerParentId'] = request.trustedCallerParentId;
  }
  if (!Util.isUnset(request.trustedCallerType)) {
    body['TrustedCallerType'] = request.trustedCallerType;
  }
  if (!Util.isUnset(request.trustedCallerUid)) {
    body['TrustedCallerUid'] = request.trustedCallerUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InnerGetSparkAppInfo',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取Spark应用的详细信息
 *
 * @param request InnerGetSparkAppInfoRequest
 * @return InnerGetSparkAppInfoResponse
 */
async function innerGetSparkAppInfo(request: InnerGetSparkAppInfoRequest): InnerGetSparkAppInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return innerGetSparkAppInfoWithOptions(request, runtime);
}

model InnerGetSparkAppLogRequest {
  appId?: string(name='AppId', description='This parameter is required.'),
  logLength?: long(name='LogLength'),
  trustedCallerParentId?: long(name='TrustedCallerParentId', description='This parameter is required.'),
  trustedCallerType?: string(name='TrustedCallerType', description='This parameter is required.'),
  trustedCallerUid?: long(name='TrustedCallerUid', description='This parameter is required.'),
}

model InnerGetSparkAppLogResponseBody = {
  data?: {
    logContent?: string(name='LogContent'),
    message?: string(name='Message'),
  }(name='Data'),
  requestId?: string(name='RequestId'),
}

model InnerGetSparkAppLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InnerGetSparkAppLogResponseBody(name='body'),
}

/**
 * @summary 获取Spark App的部分日志
 *
 * @param request InnerGetSparkAppLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InnerGetSparkAppLogResponse
 */
async function innerGetSparkAppLogWithOptions(request: InnerGetSparkAppLogRequest, runtime: Util.RuntimeOptions): InnerGetSparkAppLogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.logLength)) {
    body['LogLength'] = request.logLength;
  }
  if (!Util.isUnset(request.trustedCallerParentId)) {
    body['TrustedCallerParentId'] = request.trustedCallerParentId;
  }
  if (!Util.isUnset(request.trustedCallerType)) {
    body['TrustedCallerType'] = request.trustedCallerType;
  }
  if (!Util.isUnset(request.trustedCallerUid)) {
    body['TrustedCallerUid'] = request.trustedCallerUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InnerGetSparkAppLog',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取Spark App的部分日志
 *
 * @param request InnerGetSparkAppLogRequest
 * @return InnerGetSparkAppLogResponse
 */
async function innerGetSparkAppLog(request: InnerGetSparkAppLogRequest): InnerGetSparkAppLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return innerGetSparkAppLogWithOptions(request, runtime);
}

model InnerGetSparkAppStateRequest {
  appId?: string(name='AppId', description='This parameter is required.'),
  trustedCallerParentId?: long(name='TrustedCallerParentId', description='This parameter is required.'),
  trustedCallerType?: string(name='TrustedCallerType', description='This parameter is required.'),
  trustedCallerUid?: long(name='TrustedCallerUid', description='This parameter is required.'),
}

model InnerGetSparkAppStateResponseBody = {
  data?: {
    appId?: string(name='AppId'),
    appName?: string(name='AppName'),
    message?: string(name='Message'),
    state?: string(name='State'),
  }(name='Data'),
  requestId?: string(name='RequestId'),
}

model InnerGetSparkAppStateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InnerGetSparkAppStateResponseBody(name='body'),
}

/**
 * @summary 获取Spark应用的状态
 *
 * @param request InnerGetSparkAppStateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InnerGetSparkAppStateResponse
 */
async function innerGetSparkAppStateWithOptions(request: InnerGetSparkAppStateRequest, runtime: Util.RuntimeOptions): InnerGetSparkAppStateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.trustedCallerParentId)) {
    body['TrustedCallerParentId'] = request.trustedCallerParentId;
  }
  if (!Util.isUnset(request.trustedCallerType)) {
    body['TrustedCallerType'] = request.trustedCallerType;
  }
  if (!Util.isUnset(request.trustedCallerUid)) {
    body['TrustedCallerUid'] = request.trustedCallerUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InnerGetSparkAppState',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取Spark应用的状态
 *
 * @param request InnerGetSparkAppStateRequest
 * @return InnerGetSparkAppStateResponse
 */
async function innerGetSparkAppState(request: InnerGetSparkAppStateRequest): InnerGetSparkAppStateResponse {
  var runtime = new Util.RuntimeOptions{};
  return innerGetSparkAppStateWithOptions(request, runtime);
}

model InnerGetSparkAppWebUiAddressRequest {
  appId?: string(name='AppId', description='This parameter is required.'),
  trustedCallerParentId?: long(name='TrustedCallerParentId', description='This parameter is required.'),
  trustedCallerType?: string(name='TrustedCallerType', description='This parameter is required.'),
  trustedCallerUid?: long(name='TrustedCallerUid', description='This parameter is required.'),
}

model InnerGetSparkAppWebUiAddressResponseBody = {
  data?: {
    appId?: string(name='AppId'),
    expirationTimeInMillis?: long(name='ExpirationTimeInMillis'),
    webUiAddress?: string(name='WebUiAddress'),
  }(name='Data'),
  requestId?: string(name='RequestId'),
}

model InnerGetSparkAppWebUiAddressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InnerGetSparkAppWebUiAddressResponseBody(name='body'),
}

/**
 * @summary 获取Spark应用的详细信息
 *
 * @param request InnerGetSparkAppWebUiAddressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InnerGetSparkAppWebUiAddressResponse
 */
async function innerGetSparkAppWebUiAddressWithOptions(request: InnerGetSparkAppWebUiAddressRequest, runtime: Util.RuntimeOptions): InnerGetSparkAppWebUiAddressResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.trustedCallerParentId)) {
    body['TrustedCallerParentId'] = request.trustedCallerParentId;
  }
  if (!Util.isUnset(request.trustedCallerType)) {
    body['TrustedCallerType'] = request.trustedCallerType;
  }
  if (!Util.isUnset(request.trustedCallerUid)) {
    body['TrustedCallerUid'] = request.trustedCallerUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InnerGetSparkAppWebUiAddress',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取Spark应用的详细信息
 *
 * @param request InnerGetSparkAppWebUiAddressRequest
 * @return InnerGetSparkAppWebUiAddressResponse
 */
async function innerGetSparkAppWebUiAddress(request: InnerGetSparkAppWebUiAddressRequest): InnerGetSparkAppWebUiAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return innerGetSparkAppWebUiAddressWithOptions(request, runtime);
}

model InnerKillSparkAppRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='202112291908la01960012372'),
  trustedCallerParentId?: long(name='TrustedCallerParentId', description='This parameter is required.'),
  trustedCallerType?: string(name='TrustedCallerType', description='This parameter is required.'),
  trustedCallerUid?: long(name='TrustedCallerUid', description='This parameter is required.'),
}

model InnerKillSparkAppResponseBody = {
  data?: {
    appId?: string(name='AppId'),
    appName?: string(name='AppName'),
    message?: string(name='Message'),
    state?: string(name='State'),
  }(name='Data'),
  requestId?: string(name='RequestId'),
}

model InnerKillSparkAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InnerKillSparkAppResponseBody(name='body'),
}

/**
 * @summary 终止一个Spark Application的运行
 *
 * @param request InnerKillSparkAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InnerKillSparkAppResponse
 */
async function innerKillSparkAppWithOptions(request: InnerKillSparkAppRequest, runtime: Util.RuntimeOptions): InnerKillSparkAppResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.trustedCallerParentId)) {
    body['TrustedCallerParentId'] = request.trustedCallerParentId;
  }
  if (!Util.isUnset(request.trustedCallerType)) {
    body['TrustedCallerType'] = request.trustedCallerType;
  }
  if (!Util.isUnset(request.trustedCallerUid)) {
    body['TrustedCallerUid'] = request.trustedCallerUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InnerKillSparkApp',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 终止一个Spark Application的运行
 *
 * @param request InnerKillSparkAppRequest
 * @return InnerKillSparkAppResponse
 */
async function innerKillSparkApp(request: InnerKillSparkAppRequest): InnerKillSparkAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return innerKillSparkAppWithOptions(request, runtime);
}

model InnerSubmitSparkAppRequest {
  agentSource?: string(name='AgentSource', example='Console'),
  agentVersion?: string(name='AgentVersion', example='1.091'),
  appName?: string(name='AppName', example='TestApp'),
  appType?: string(name='AppType', description='This parameter is required.', example='SQL'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.', example='am-bxxx'),
  data?: string(name='Data', description='This parameter is required.'),
  resourceGroupName?: string(name='ResourceGroupName', example='rg-xxx'),
  templateFileId?: long(name='TemplateFileId'),
  trustedCallerParentId?: long(name='TrustedCallerParentId', description='This parameter is required.'),
  trustedCallerType?: string(name='TrustedCallerType', description='This parameter is required.'),
  trustedCallerUid?: long(name='TrustedCallerUid', description='This parameter is required.'),
}

model InnerSubmitSparkAppResponseBody = {
  data?: {
    appId?: string(name='AppId'),
    appName?: string(name='AppName'),
    message?: string(name='Message'),
    state?: string(name='State'),
  }(name='Data'),
  requestId?: string(name='RequestId'),
}

model InnerSubmitSparkAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InnerSubmitSparkAppResponseBody(name='body'),
}

/**
 * @summary 内部用提交一个Spark Application
 *
 * @param request InnerSubmitSparkAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InnerSubmitSparkAppResponse
 */
async function innerSubmitSparkAppWithOptions(request: InnerSubmitSparkAppRequest, runtime: Util.RuntimeOptions): InnerSubmitSparkAppResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.agentSource)) {
    body['AgentSource'] = request.agentSource;
  }
  if (!Util.isUnset(request.agentVersion)) {
    body['AgentVersion'] = request.agentVersion;
  }
  if (!Util.isUnset(request.appName)) {
    body['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.appType)) {
    body['AppType'] = request.appType;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    body['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.resourceGroupName)) {
    body['ResourceGroupName'] = request.resourceGroupName;
  }
  if (!Util.isUnset(request.templateFileId)) {
    body['TemplateFileId'] = request.templateFileId;
  }
  if (!Util.isUnset(request.trustedCallerParentId)) {
    body['TrustedCallerParentId'] = request.trustedCallerParentId;
  }
  if (!Util.isUnset(request.trustedCallerType)) {
    body['TrustedCallerType'] = request.trustedCallerType;
  }
  if (!Util.isUnset(request.trustedCallerUid)) {
    body['TrustedCallerUid'] = request.trustedCallerUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InnerSubmitSparkApp',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 内部用提交一个Spark Application
 *
 * @param request InnerSubmitSparkAppRequest
 * @return InnerSubmitSparkAppResponse
 */
async function innerSubmitSparkApp(request: InnerSubmitSparkAppRequest): InnerSubmitSparkAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return innerSubmitSparkAppWithOptions(request, runtime);
}

model ListServiceQuotasRequest {
  aliyunUid?: string(name='AliyunUid'),
  bid?: string(name='Bid'),
  categoryEnum?: string(name='CategoryEnum'),
  dimensionGroupKey?: string(name='DimensionGroupKey'),
  dimensions?: string(name='Dimensions'),
  keyword?: string(name='Keyword'),
  maxResults?: int32(name='MaxResults'),
  nextToken?: string(name='NextToken'),
  productCode?: string(name='ProductCode'),
  quotaActionCode?: string(name='QuotaActionCode'),
  sortField?: string(name='SortField'),
  sortOrder?: string(name='SortOrder'),
  useCache?: boolean(name='UseCache'),
}

model ListServiceQuotasResponseBody = {
  maxResults?: int32(name='MaxResults'),
  nextToken?: string(name='NextToken'),
  quotas?: [ 
    {
      adjustable?: boolean(name='Adjustable'),
      applicable?: string(name='Applicable'),
      applicableType?: string(name='ApplicableType'),
      dimensions?: string(name='Dimensions'),
      expireTime?: string(name='ExpireTime'),
      quotaActionCode?: string(name='QuotaActionCode'),
      totalQuota?: double(name='TotalQuota'),
      totalUsage?: double(name='TotalUsage'),
      unadjustableDetail?: string(name='UnadjustableDetail'),
      unit?: string(name='Unit'),
    }
  ](name='Quotas'),
  requestId?: string(name='RequestId'),
  totalCount?: int32(name='TotalCount'),
}

model ListServiceQuotasResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListServiceQuotasResponseBody(name='body'),
}

/**
 * @summary 查询API配额信息
 *
 * @param request ListServiceQuotasRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListServiceQuotasResponse
 */
async function listServiceQuotasWithOptions(request: ListServiceQuotasRequest, runtime: Util.RuntimeOptions): ListServiceQuotasResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.aliyunUid)) {
    body['AliyunUid'] = request.aliyunUid;
  }
  if (!Util.isUnset(request.bid)) {
    body['Bid'] = request.bid;
  }
  if (!Util.isUnset(request.categoryEnum)) {
    body['CategoryEnum'] = request.categoryEnum;
  }
  if (!Util.isUnset(request.dimensionGroupKey)) {
    body['DimensionGroupKey'] = request.dimensionGroupKey;
  }
  if (!Util.isUnset(request.dimensions)) {
    body['Dimensions'] = request.dimensions;
  }
  if (!Util.isUnset(request.keyword)) {
    body['Keyword'] = request.keyword;
  }
  if (!Util.isUnset(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.productCode)) {
    body['ProductCode'] = request.productCode;
  }
  if (!Util.isUnset(request.quotaActionCode)) {
    body['QuotaActionCode'] = request.quotaActionCode;
  }
  if (!Util.isUnset(request.sortField)) {
    body['SortField'] = request.sortField;
  }
  if (!Util.isUnset(request.sortOrder)) {
    body['SortOrder'] = request.sortOrder;
  }
  if (!Util.isUnset(request.useCache)) {
    body['UseCache'] = request.useCache;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListServiceQuotas',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询API配额信息
 *
 * @param request ListServiceQuotasRequest
 * @return ListServiceQuotasResponse
 */
async function listServiceQuotas(request: ListServiceQuotasRequest): ListServiceQuotasResponse {
  var runtime = new Util.RuntimeOptions{};
  return listServiceQuotasWithOptions(request, runtime);
}

model MigrateDBClusterRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  dryRun?: boolean(name='DryRun'),
  linkSwitchMode?: string(name='LinkSwitchMode', example='dns'),
  newShardNumber?: long(name='NewShardNumber'),
  switchTime?: string(name='SwitchTime', description='Use the UTC time format: yyyy-MM-ddTHH:mm:ssZ'),
  switchTimeMode?: long(name='SwitchTimeMode'),
}

model MigrateDBClusterResponseBody = {
  requestId?: string(name='RequestId'),
}

model MigrateDBClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: MigrateDBClusterResponseBody(name='body'),
}

/**
 * @summary 迁移集群
 *
 * @param request MigrateDBClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return MigrateDBClusterResponse
 */
async function migrateDBClusterWithOptions(request: MigrateDBClusterRequest, runtime: Util.RuntimeOptions): MigrateDBClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.dryRun)) {
    query['DryRun'] = request.dryRun;
  }
  if (!Util.isUnset(request.linkSwitchMode)) {
    query['LinkSwitchMode'] = request.linkSwitchMode;
  }
  if (!Util.isUnset(request.newShardNumber)) {
    query['NewShardNumber'] = request.newShardNumber;
  }
  if (!Util.isUnset(request.switchTime)) {
    query['SwitchTime'] = request.switchTime;
  }
  if (!Util.isUnset(request.switchTimeMode)) {
    query['SwitchTimeMode'] = request.switchTimeMode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'MigrateDBCluster',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 迁移集群
 *
 * @param request MigrateDBClusterRequest
 * @return MigrateDBClusterResponse
 */
async function migrateDBCluster(request: MigrateDBClusterRequest): MigrateDBClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return migrateDBClusterWithOptions(request, runtime);
}

model ModifyDBClusterConfigRequest {
  configs?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Configs'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
}

model ModifyDBClusterConfigShrinkRequest {
  configsShrink?: string(name='Configs'),
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
}

model ModifyDBClusterConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyDBClusterConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDBClusterConfigResponseBody(name='body'),
}

/**
 * @summary 修改实例配置
 *
 * @param tmpReq ModifyDBClusterConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDBClusterConfigResponse
 */
async function modifyDBClusterConfigWithOptions(tmpReq: ModifyDBClusterConfigRequest, runtime: Util.RuntimeOptions): ModifyDBClusterConfigResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyDBClusterConfigShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.configs)) {
    request.configsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.configs, 'Configs', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.configsShrink)) {
    query['Configs'] = request.configsShrink;
  }
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyDBClusterConfig',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 修改实例配置
 *
 * @param request ModifyDBClusterConfigRequest
 * @return ModifyDBClusterConfigResponse
 */
async function modifyDBClusterConfig(request: ModifyDBClusterConfigRequest): ModifyDBClusterConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDBClusterConfigWithOptions(request, runtime);
}

model ModifyMajorCustomerRequest {
  area?: string(name='Area'),
  customerId?: long(name='CustomerId', description='This parameter is required.'),
  customerName?: string(name='CustomerName', description='This parameter is required.'),
  description?: string(name='Description'),
  industry?: string(name='Industry'),
  pd?: string(name='Pd'),
  pdsa?: string(name='Pdsa'),
  ranking?: int32(name='Ranking'),
  rd?: string(name='Rd'),
  sa?: string(name='Sa'),
}

model ModifyMajorCustomerResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyMajorCustomerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyMajorCustomerResponseBody(name='body'),
}

/**
 * @summary 修改重点客户信息
 *
 * @param request ModifyMajorCustomerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyMajorCustomerResponse
 */
async function modifyMajorCustomerWithOptions(request: ModifyMajorCustomerRequest, runtime: Util.RuntimeOptions): ModifyMajorCustomerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.area)) {
    query['Area'] = request.area;
  }
  if (!Util.isUnset(request.customerId)) {
    query['CustomerId'] = request.customerId;
  }
  if (!Util.isUnset(request.customerName)) {
    query['CustomerName'] = request.customerName;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.industry)) {
    query['Industry'] = request.industry;
  }
  if (!Util.isUnset(request.pd)) {
    query['Pd'] = request.pd;
  }
  if (!Util.isUnset(request.pdsa)) {
    query['Pdsa'] = request.pdsa;
  }
  if (!Util.isUnset(request.ranking)) {
    query['Ranking'] = request.ranking;
  }
  if (!Util.isUnset(request.rd)) {
    query['Rd'] = request.rd;
  }
  if (!Util.isUnset(request.sa)) {
    query['Sa'] = request.sa;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyMajorCustomer',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 修改重点客户信息
 *
 * @param request ModifyMajorCustomerRequest
 * @return ModifyMajorCustomerResponse
 */
async function modifyMajorCustomer(request: ModifyMajorCustomerRequest): ModifyMajorCustomerResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyMajorCustomerWithOptions(request, runtime);
}

model ModifyServiceQuotaRequest {
  aliyunUid?: string(name='AliyunUid'),
  applicationId?: string(name='ApplicationId'),
  dimensions?: map[string]any(name='Dimensions'),
  productCode?: string(name='ProductCode'),
  quotaActionCode?: string(name='QuotaActionCode'),
  quotaCategory?: string(name='QuotaCategory'),
  reason?: string(name='Reason'),
  regionId?: string(name='RegionId'),
  value?: string(name='Value'),
}

model ModifyServiceQuotaShrinkRequest {
  aliyunUid?: string(name='AliyunUid'),
  applicationId?: string(name='ApplicationId'),
  dimensionsShrink?: string(name='Dimensions'),
  productCode?: string(name='ProductCode'),
  quotaActionCode?: string(name='QuotaActionCode'),
  quotaCategory?: string(name='QuotaCategory'),
  reason?: string(name='Reason'),
  regionId?: string(name='RegionId'),
  value?: string(name='Value'),
}

model ModifyServiceQuotaResponseBody = {
  dimensions?: map[string]string(name='Dimensions'),
  expireTime?: string(name='ExpireTime'),
  quotaActionCode?: string(name='QuotaActionCode'),
  requestId?: string(name='RequestId'),
  totalQuota?: long(name='TotalQuota'),
  totalUsage?: long(name='TotalUsage'),
}

model ModifyServiceQuotaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyServiceQuotaResponseBody(name='body'),
}

/**
 * @summary 用户申请审批通过后通知云产品调整quota
 *
 * @param tmpReq ModifyServiceQuotaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyServiceQuotaResponse
 */
async function modifyServiceQuotaWithOptions(tmpReq: ModifyServiceQuotaRequest, runtime: Util.RuntimeOptions): ModifyServiceQuotaResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyServiceQuotaShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.dimensions)) {
    request.dimensionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.dimensions, 'Dimensions', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.aliyunUid)) {
    query['AliyunUid'] = request.aliyunUid;
  }
  if (!Util.isUnset(request.applicationId)) {
    query['ApplicationId'] = request.applicationId;
  }
  if (!Util.isUnset(request.dimensionsShrink)) {
    query['Dimensions'] = request.dimensionsShrink;
  }
  if (!Util.isUnset(request.productCode)) {
    query['ProductCode'] = request.productCode;
  }
  if (!Util.isUnset(request.quotaActionCode)) {
    query['QuotaActionCode'] = request.quotaActionCode;
  }
  if (!Util.isUnset(request.quotaCategory)) {
    query['QuotaCategory'] = request.quotaCategory;
  }
  if (!Util.isUnset(request.reason)) {
    query['Reason'] = request.reason;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.value)) {
    query['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyServiceQuota',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 用户申请审批通过后通知云产品调整quota
 *
 * @param request ModifyServiceQuotaRequest
 * @return ModifyServiceQuotaResponse
 */
async function modifyServiceQuota(request: ModifyServiceQuotaRequest): ModifyServiceQuotaResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyServiceQuotaWithOptions(request, runtime);
}

model PreloadSparkAppMetricsRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='s202204221525hzca7d8140000003'),
}

model PreloadSparkAppMetricsResponseBody = {
  data?: {
    appId?: string(name='AppId'),
    attemptId?: string(name='AttemptId'),
    eventLogPath?: string(name='EventLogPath'),
    finished?: boolean(name='Finished'),
    scanMetrics?: {
      outputRowsCount?: long(name='OutputRowsCount'),
      totalReadFileSizeInByte?: long(name='TotalReadFileSizeInByte'),
    }(name='ScanMetrics'),
  }(name='Data'),
  requestId?: string(name='RequestId'),
}

model PreloadSparkAppMetricsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PreloadSparkAppMetricsResponseBody(name='body'),
}

/**
 * @summary 预加载Spark应用指标信息
 *
 * @param request PreloadSparkAppMetricsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PreloadSparkAppMetricsResponse
 */
async function preloadSparkAppMetricsWithOptions(request: PreloadSparkAppMetricsRequest, runtime: Util.RuntimeOptions): PreloadSparkAppMetricsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PreloadSparkAppMetrics',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 预加载Spark应用指标信息
 *
 * @param request PreloadSparkAppMetricsRequest
 * @return PreloadSparkAppMetricsResponse
 */
async function preloadSparkAppMetrics(request: PreloadSparkAppMetricsRequest): PreloadSparkAppMetricsResponse {
  var runtime = new Util.RuntimeOptions{};
  return preloadSparkAppMetricsWithOptions(request, runtime);
}

model ReleaseClusterVpcConnectionRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  engine?: string(name='Engine'),
  insType?: string(name='InsType'),
}

model ReleaseClusterVpcConnectionResponseBody = {
  requestId?: string(name='RequestId'),
}

model ReleaseClusterVpcConnectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReleaseClusterVpcConnectionResponseBody(name='body'),
}

/**
 * @param request ReleaseClusterVpcConnectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReleaseClusterVpcConnectionResponse
 */
async function releaseClusterVpcConnectionWithOptions(request: ReleaseClusterVpcConnectionRequest, runtime: Util.RuntimeOptions): ReleaseClusterVpcConnectionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.engine)) {
    query['Engine'] = request.engine;
  }
  if (!Util.isUnset(request.insType)) {
    query['InsType'] = request.insType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReleaseClusterVpcConnection',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ReleaseClusterVpcConnectionRequest
 * @return ReleaseClusterVpcConnectionResponse
 */
async function releaseClusterVpcConnection(request: ReleaseClusterVpcConnectionRequest): ReleaseClusterVpcConnectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return releaseClusterVpcConnectionWithOptions(request, runtime);
}

model RestartDBClusterRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
}

model RestartDBClusterResponseBody = {
  requestId?: string(name='RequestId'),
  taskId?: string(name='TaskId'),
}

model RestartDBClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RestartDBClusterResponseBody(name='body'),
}

/**
 * @summary 给实例开启VPC连接
 *
 * @param request RestartDBClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RestartDBClusterResponse
 */
async function restartDBClusterWithOptions(request: RestartDBClusterRequest, runtime: Util.RuntimeOptions): RestartDBClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RestartDBCluster',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 给实例开启VPC连接
 *
 * @param request RestartDBClusterRequest
 * @return RestartDBClusterResponse
 */
async function restartDBCluster(request: RestartDBClusterRequest): RestartDBClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return restartDBClusterWithOptions(request, runtime);
}

model RevokeInstanceEgressRequest {
  DBClusterId?: string(name='DBClusterId', description='This parameter is required.'),
  endpointId?: string(name='EndpointId', description='This parameter is required.'),
  insType?: string(name='InsType', description='This parameter is required.'),
}

model RevokeInstanceEgressResponseBody = {
  requestId?: string(name='RequestId'),
}

model RevokeInstanceEgressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RevokeInstanceEgressResponseBody(name='body'),
}

/**
 * @param request RevokeInstanceEgressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RevokeInstanceEgressResponse
 */
async function revokeInstanceEgressWithOptions(request: RevokeInstanceEgressRequest, runtime: Util.RuntimeOptions): RevokeInstanceEgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.DBClusterId)) {
    query['DBClusterId'] = request.DBClusterId;
  }
  if (!Util.isUnset(request.endpointId)) {
    query['EndpointId'] = request.endpointId;
  }
  if (!Util.isUnset(request.insType)) {
    query['InsType'] = request.insType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RevokeInstanceEgress',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request RevokeInstanceEgressRequest
 * @return RevokeInstanceEgressResponse
 */
async function revokeInstanceEgress(request: RevokeInstanceEgressRequest): RevokeInstanceEgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return revokeInstanceEgressWithOptions(request, runtime);
}

model SetBucketTransferAccelerationRequest {
  accelerationEnabled?: boolean(name='AccelerationEnabled'),
  ak?: string(name='Ak'),
  bucketName?: string(name='BucketName'),
  encryptedSk?: string(name='EncryptedSk'),
  endpoint?: string(name='Endpoint'),
  regionId?: string(name='RegionId'),
}

model SetBucketTransferAccelerationResponseBody = {
  requestId?: string(name='RequestId'),
  data?: boolean(name='data'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model SetBucketTransferAccelerationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetBucketTransferAccelerationResponseBody(name='body'),
}

/**
 * @summary 开启/关闭指定OSSBucket的传输加速功能
 *
 * @param request SetBucketTransferAccelerationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetBucketTransferAccelerationResponse
 */
async function setBucketTransferAccelerationWithOptions(request: SetBucketTransferAccelerationRequest, runtime: Util.RuntimeOptions): SetBucketTransferAccelerationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accelerationEnabled)) {
    query['AccelerationEnabled'] = request.accelerationEnabled;
  }
  if (!Util.isUnset(request.ak)) {
    query['Ak'] = request.ak;
  }
  if (!Util.isUnset(request.bucketName)) {
    query['BucketName'] = request.bucketName;
  }
  if (!Util.isUnset(request.encryptedSk)) {
    query['EncryptedSk'] = request.encryptedSk;
  }
  if (!Util.isUnset(request.endpoint)) {
    query['Endpoint'] = request.endpoint;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetBucketTransferAcceleration',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 开启/关闭指定OSSBucket的传输加速功能
 *
 * @param request SetBucketTransferAccelerationRequest
 * @return SetBucketTransferAccelerationResponse
 */
async function setBucketTransferAcceleration(request: SetBucketTransferAccelerationRequest): SetBucketTransferAccelerationResponse {
  var runtime = new Util.RuntimeOptions{};
  return setBucketTransferAccelerationWithOptions(request, runtime);
}

model StartOssBucketReplicationRequest {
  ak?: string(name='Ak'),
  encryptedSk?: string(name='EncryptedSk'),
  endpoint?: string(name='Endpoint'),
  prefixList?: [ string ](name='PrefixList'),
  regionId?: string(name='RegionId'),
  replicaKmsKeyId?: string(name='ReplicaKmsKeyId'),
  roleName?: string(name='RoleName'),
  sourceBucketName?: string(name='SourceBucketName'),
  sseKmsEncryptedObjectsStatus?: string(name='SseKmsEncryptedObjectsStatus'),
  targetBucketName?: string(name='TargetBucketName'),
  targetRegionCode?: string(name='TargetRegionCode'),
}

model StartOssBucketReplicationShrinkRequest {
  ak?: string(name='Ak'),
  encryptedSk?: string(name='EncryptedSk'),
  endpoint?: string(name='Endpoint'),
  prefixListShrink?: string(name='PrefixList'),
  regionId?: string(name='RegionId'),
  replicaKmsKeyId?: string(name='ReplicaKmsKeyId'),
  roleName?: string(name='RoleName'),
  sourceBucketName?: string(name='SourceBucketName'),
  sseKmsEncryptedObjectsStatus?: string(name='SseKmsEncryptedObjectsStatus'),
  targetBucketName?: string(name='TargetBucketName'),
  targetRegionCode?: string(name='TargetRegionCode'),
}

model StartOssBucketReplicationResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='httpStatusCode'),
  message?: string(name='message'),
  resultCode?: string(name='resultCode'),
  success?: boolean(name='success'),
}

model StartOssBucketReplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartOssBucketReplicationResponseBody(name='body'),
}

/**
 * @summary 创建并执行OSS跨区域复制任务
 *
 * @param tmpReq StartOssBucketReplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartOssBucketReplicationResponse
 */
async function startOssBucketReplicationWithOptions(tmpReq: StartOssBucketReplicationRequest, runtime: Util.RuntimeOptions): StartOssBucketReplicationResponse {
  Util.validateModel(tmpReq);
  var request = new StartOssBucketReplicationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.prefixList)) {
    request.prefixListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.prefixList, 'PrefixList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.ak)) {
    query['Ak'] = request.ak;
  }
  if (!Util.isUnset(request.encryptedSk)) {
    query['EncryptedSk'] = request.encryptedSk;
  }
  if (!Util.isUnset(request.endpoint)) {
    query['Endpoint'] = request.endpoint;
  }
  if (!Util.isUnset(request.prefixListShrink)) {
    query['PrefixList'] = request.prefixListShrink;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.replicaKmsKeyId)) {
    query['ReplicaKmsKeyId'] = request.replicaKmsKeyId;
  }
  if (!Util.isUnset(request.roleName)) {
    query['RoleName'] = request.roleName;
  }
  if (!Util.isUnset(request.sourceBucketName)) {
    query['SourceBucketName'] = request.sourceBucketName;
  }
  if (!Util.isUnset(request.sseKmsEncryptedObjectsStatus)) {
    query['SseKmsEncryptedObjectsStatus'] = request.sseKmsEncryptedObjectsStatus;
  }
  if (!Util.isUnset(request.targetBucketName)) {
    query['TargetBucketName'] = request.targetBucketName;
  }
  if (!Util.isUnset(request.targetRegionCode)) {
    query['TargetRegionCode'] = request.targetRegionCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartOssBucketReplication',
    version = '2021-12-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 创建并执行OSS跨区域复制任务
 *
 * @param request StartOssBucketReplicationRequest
 * @return StartOssBucketReplicationResponse
 */
async function startOssBucketReplication(request: StartOssBucketReplicationRequest): StartOssBucketReplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  return startOssBucketReplicationWithOptions(request, runtime);
}

